package com.wchen.demo.controller;

import com.wchen.demo.domain.UserDo;
import com.wchen.demo.page.PageQueryWrapper;
import com.wchen.demo.vo.SkipVo;
import com.wchen.demo.vo.UserVo;
import org.springframework.web.bind.annotation.*;

/**
 * 用户测试
 *
 * @author  wchen
 * @date    2019/11/12
 */
@RequestMapping("/user")
@RestController
public class UserController {

    /**
     * 新增用户
     * @param userDo
     */
    @PostMapping("/")
    public void saveUser(@RequestBody UserDo userDo) {

    }

    /**
     * 设置用户昵称及头像
     * @param id
     * @param nickName
     * @param headIcon
     * @return
     */
    @PutMapping("/{id}")
    public UserVo info(@PathVariable String id, @RequestParam String nickName, @RequestParam String headIcon) {
        return new UserVo();
    }

    /**
     * 查询用户详情
     * @param id
     */
    @GetMapping("/{id}")
    public UserVo info(@PathVariable String id) {
        return new UserVo();
    }

    /**
     * 列表查询
     * @param queryWrapper
     */
   @GetMapping("/list")
    public void list(@RequestBody PageQueryWrapper<UserDo> queryWrapper) {

    }

    /**
     * 跳过测试
     *
     * @param userDo
     * @param skipVo
     */
    @PostMapping("/skipTest")
    public String testSkip(@RequestBody UserDo userDo, SkipVo skipVo) {
        return null;
    }

}
